import axios from 'axios'
import qs from 'qs'
import rootApi from '../../../../routerUrl'
const root = rootApi.gmcApiUrl;

const noticeUrl = {

    getHolidaysList: `${root}/School/getHolidaysList`,
    getHolidaysApi: `${root}/School/getHolidaysApi`,
    addHolidaysAction: `${root}/School/addHolidaysAction`,
    updateHolidaysAction: `${root}/School/updateHolidaysAction`,
    delHolidaysAction: `${root}/School/delHolidaysAction`,
    getMonthList: `${root}/School/getMonthList`,
}

export default {
    getHolidaysList(params) {
        return axios.get(noticeUrl.getHolidaysList, {
            params
        })
    },
    getHolidaysApi(params) {
        return axios.get(noticeUrl.getHolidaysApi, {
            params
        })
    },
    getMonthList(params) {
        return axios.get(noticeUrl.getMonthList, {
            params
        })
    },
    addHolidaysAction(params) {
        return axios.post(noticeUrl.addHolidaysAction, qs.stringify(params))
    },
    updateHolidaysAction(params) {
        return axios.post(noticeUrl.updateHolidaysAction, qs.stringify(params))
    },
    delHolidaysAction(params) {
        return axios.post(noticeUrl.delHolidaysAction, qs.stringify(params))
    },
}